package org.extremengine.demo;

import java.awt.Graphics;

import org.extremengine.common.RigidBody;
import org.extremengine.common.Velocity;
import org.extremengine.demo.BasePanelWorld.DemoCallback;
import org.extremengine.shape.Circle;

public class PanelThrow2 extends BasePanelWorld {

	RigidBody ball;

	public PanelThrow2(DemoCallback demoCallback) {
		super(demoCallback);
	}

	@Override
	public void initDemoWorld() {
		super.initDemoWorld();
		ball = world.createRigidBody(new Object(), 0, 0.5, 10, new Circle(2, 28, 1));
		ball.setV(new Velocity(50, 0));
	}

	@Override
	public void paint(Graphics g) {
		super.paint(g);
		if (!world.isRunning()) {
			this.drawRigidBody(g, ball);
		}
	}

}
